package com.wc.AlgoOJ_train.train1.c7.A703;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2024/1/11 9:52
 * @description 超级楼梯
 * http://43.138.190.70:8888/p/A703
 */
public class Main {
    public static void main(String[] args) {
        long[] dp = new long[41];
        dp[1] = 1;
        dp[2] = 1;
        for (int i = 3; i <= 40; i++) {
            dp[i] = dp[i - 1] + dp[i - 2];
        }
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while (n-- > 0){
            int m = sc.nextInt();
            System.out.println(dp[m]);
        }
    }
}
